programming4us
           
 
 
Applications Server

BizTalk Server 2009 : Using asynchronous services in WCF (part 2)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/14/2010 4:46:29 PM
Notice that we have a single, synchronous service operation defined. This operation accepts an adverse event, and returns the resulting action that the submitter should take.

We now need an actual service implementation of this interface. In a separate class file, I have my very simple service that looks like this:

public AdverseEventAction SubmitAdverseEvent(AdverseEvent NewAE)
{
AdverseEventAction AEAction = new AdverseEventAction();
AEAction.SubmissionID = Guid.NewGuid().ToString();
AEAction.PatientID = NewAE.PatientID;
AEAction.Product = NewAE.Product;
//initialize values
AEAction.doAdmitHospital = false;
AEAction.doCeaseMedication = false;
AEAction.doReduceDosage = false;
AEAction.doScheduleFollowup = false;
AEAction.AdditionalNotes = "";
TimeSpan aeDuration= DateTime.Now.Subtract(NewAE.DateStarted);
if (NewAE.Category == AECategoryType.InjectionSoreness && aeDuration.Days > 3)
{
AEAction.doReduceDosage = true;
}
return AEAction;
}


For this basic scenario, we're checking to see if someone is still experiencing soreness more than three days after a drug injection. Our next step is to actually host this WCF service, so that it is visible to the outside world. Up until now, we've focused primarily on self-hosting, but I'm going to switch gears and take advantage of IIS 7.0 and Windows Process Activation Services (WAS) for hosting our WCF services.

Let's add a WCF Service Web Site project to our existing Visual Studio.NET solution.

Once again, we are provided some sample classes and implementation objects by this Visual Studio.NET project type. We can freely delete the Service1.cs class files as we won't be putting actual service implementation logic into this host container. Next, we have to add a reference to our existing WCF service library project. After that, we change the directive at the top of the Service.svc file so that it points to the service type residing in our referenced library. That single line at the top should read:

<%@ ServiceHost Language="C#" Debug="true" Service="Seroter.BizTalkSOA.Chapter6.ServiceLibrary. AdverseEventSyncService" %>


Almost there. All that remains to do is use the WCF Service Configuration Editor to update the web.config file to accurately reflect our referenced service configuration. We only need to modify the service name and the endpoint contract.

You may notice that we do not need to add either a base address or service address in order for this service configuration to be complete. When a service is hosted within IIS 7.0, the base address is equal to the address of the .svc file.

We can confirm a successful configuration by opening IIS 7.0, locating our new service, and browsing the .svc file. You should see the standard WCF service introduction page.

Other -----------------
- Exchange Server 2010 : Troubleshooting Federated Delegation (part 3) - Troubleshooting Calendar and Contacts Sharing
- Exchange Server 2010 : Troubleshooting Federated Delegation (part 2) - Troubleshooting Organization Relationships
- Exchange Server 2010 : Troubleshooting Federated Delegation (part 1) - Troubleshooting the Federation Trust
- Exchange Server 2010 : Federation Scenarios (part 3) - Federating with Online Services
- Exchange Server 2010 : Federation Scenarios (part 2) - Calendar and Contacts Sharing
- Exchange Server 2010 : Federation Scenarios (part 1) - Free/Busy Access
- Active Directory Domain Services 2008: View Settings Defined in Password Settings Objects
- Active Directory Domain Services 2008: Delete Password Settings Objects
- Active Directory Domain Services 2008: Create Password Settings Objects
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 4)
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 3) - Organization Relationships
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 2)
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 1)
- Introduction to Federated Delegation in Exchange Server 2010
- BizTalk Server 2009 : Service-oriented endpoint patterns (part 2)
- BizTalk Server 2009 : Service-oriented endpoint patterns (part 1)
- Exchange Server 2010 : Office Communication Server 2007 R2 Integration (part 3) - Deploying Instant Messaging for OWA
- Exchange Server 2010 : Office Communication Server 2007 R2 Integration (part 2) - Deploying UM and OCS 2007 R2 Integration
- Exchange Server 2010 : Office Communication Server 2007 R2 Integration (part 1) - Integrating OCS 2007 R2 in Exchange 2010 Architecture
- Exchange Server 2010 : Managing Unified Messaging (part 1) - Testing Unified Messaging Functionality
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us